<template>
  <div class="apk_downlod" v-if="showDownApk">
    <div class="apk_downlod_btn_icon">
      <NuxtImg src="/images/home/head/icon-01.png" />
    </div>
    <div class="apk_downlod_btn_text">
      <span>{{ lang.downapk_text }}</span>
      <div class="apk_downlod_btn_download" @click="downApk" v-click-move>
        {{ lang.instalar }}
      </div>
    </div>
    <div class="apk_downlod_btn_close" @click="closeDownApk">
      <NuxtImg src="/images/home/head/dwClose.png" />
    </div>
  </div>
</template>

<script setup lang="ts">
const lang: any = getCurrentPageLang("home");

const showDownApk = ref(true);
function closeDownApk() {
  showDownApk.value = false;
}
function downApk() {
  showNotify({ type: "success", message: "此处触发下载APK-并关闭下载组件" });
  closeDownApk();
}
</script>

<style scoped lang="scss">
.apk_downlod {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background-size: 100% 100%;
  padding: 0.2rem;
  gap: 0.13rem;
  background: linear-gradient(to right, #e56ec6 0%, #e151a5 100%);
  font-size: 0.34rem;
}
.apk_downlod .apk_downlod_btn_icon {
  width: 1rem;
  margin-right: 0.19rem;
}

.apk_downlod .apk_downlod_btn_icon img {
  width: 100%;
  height: 100%;
}

.apk_downlod .apk_downlod_btn_text {
  display: flex;
  align-items: center;
}

.apk_downlod .apk_downlod_btn_text span {
  color: var(--theme-neutral1);
  font-weight: 500 !important;
  width: 5.6rem;
}

.apk_downlod .apk_downlod_btn_download {
  padding: 0.2rem 0.4rem;
  background: #ffd60c;
  color: #3b1d33;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.2rem;
}

.apk_downlod .apk_downlod_btn_close {
  margin-left: 0.1rem;
  width: 0.6rem;
  height: 0.6rem;
  background: var(--theme-neutral5);
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 1rem;
}

.apk_downlod .apk_downlod_btn_close img {
  width: 0.6rem;
  height: 0.6rem;
}
</style>
